import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
// ==================系统管理=========================
import Config from "./views/sysmanager/Config";
import Dictionary from "./views/sysmanager/Dictionary";
import Dictionaryitem from "./views/sysmanager/Dictionaryitem";
// ==================系统管理=========================

// ==================产品管理=========================
import Product from "./views/promanager/Product";
import ProductType from "./views/promanager/ProductType";
// ==================产品管理=========================

// ==================营销管理=========================
import Activity from "./views/marketing/Activity";
import ActivityRemark from "./views/marketing/ActivityRemark";
import Clue from "./views/marketing/Clue";
import ClueActivity from "./views/marketing/ClueActivity";
import ClueRemark from "./views/marketing/ClueRemark";
// ==================活动管理=========================

// ==================组织管理=========================
import Department from './views/orgs/Department.vue'
import Employee from "./views/orgs/Employee";
import Shop from "./views/orgs/Shop";
import Settled from "./views/Settled";
// ==================组织管理=========================
// ==================车辆模型=========================
import CarType from "./views/car/CarType";
import Car from "./views/car/Car";
// ==================车辆模型=========================

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/goSettled',
        component: Settled,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理'},
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/config', component: Config, name: '系统配置' },
            { path: '/dictionary', component: Dictionary, name: '数据字典' },
            { path: '/Dictionaryitem', component: Dictionaryitem, name: '数据字典详细' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '车辆模块',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/CarType', component: CarType, name: '车辆类型' },
            { path: '/car', component: Car, name: '车辆管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '营销管理',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/activity', component: Activity, name: '营销活动' },
            { path: '/activityRemark', component: ActivityRemark, name: '营销活动备注' },
            { path: '/clue', component: Clue, name: '线索' },
            { path: '/clueActivity', component: ClueActivity, name: '线索活动' },
            { path: '/clueRemark', component: ClueRemark, name: '线索备注' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'fa fa-address-card',
        // leaf: true,//只有一个节点
        children: [
            { path: '/productType', component: ProductType, name: '产品类型' },
            { path: '/product', component: Product, name: '产品' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;